Remove child flipping from GtkGrid
authorMatthias Clasen <mclasen@redhat.com>
Fri, 22 Oct 2010 14:43:45 +0000 (16:43 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 22 Oct 2010 14:43:45 +0000 (16:43 +0200)
We decided that this is not really the right thing to do, for one
thing, because it doesn't flip ::expand and ::margin properties
of children.

gtk/gtkgrid.c

index 60d55b80d9a7a8da7f00ce8712accef7110150b3..f1109b5fab84694399e34b8eafd188767cd97a5f 100644 (file)
@@ -196,44 +196,6 @@ gtk_grid_set_orientation (GtkGrid        *grid,
       priv->orientation = orientation;
 
       g_object_notify (G_OBJECT (grid), "orientation");
-
-      for (list = priv->children; list; list = list->next)
-        {
-          child = list->data;
-
-          left   = CHILD_LEFT (child);
-          top    = CHILD_TOP (child);
-          width  = CHILD_WIDTH (child);
-          height = CHILD_HEIGHT (child);
-
-          if (orientation == GTK_ORIENTATION_VERTICAL)
-            {
-              CHILD_LEFT (child)   = - (top + height);
-              CHILD_TOP (child)    = left;
-              CHILD_WIDTH (child)  = height;
-              CHILD_HEIGHT (child) = width;
-            }
-          else
-            {
-              CHILD_LEFT (child)   = top;
-              CHILD_TOP (child)    = - (left + width);
-              CHILD_WIDTH (child)  = height;
-              CHILD_HEIGHT (child) = width;
-            }
-        }
-
-      gtk_widget_queue_resize (GTK_WIDGET (grid));
-
-      for (list = priv->children; list; list = list->next)
-        {
-          child = list->data;
-
-          gtk_widget_child_notify (child->widget, "left-attach");
-          gtk_widget_child_notify (child->widget, "top-attach");
-          gtk_widget_child_notify (child->widget, "width");
-          gtk_widget_child_notify (child->widget, "height");
-
-        }
     }
 }